Process Rate Estimator
A modeling side-hustle for the ETH group sustainable agroecosystems
1 Introduction
Denitrification is the natural process by which nitrate (NO3-) in the soil are converted by bacteria into nitrous oxide (N2O) or pure nitrigen (N2). The latter is called total denitrification — the full process described in Equation 1 takes place.
\[ \ce{NO3^- ->[\text{Nitrate}][\text{reductase}] NO2^- ->[\text{Nitrite}][\text{reductase}] NO ->[\text{Nitrite oxide}][\text{reductase}] N2O^- ->[\text{Nitrous oxide}][\text{reductase}] N2} \tag{1}\]
Denitrification occurs in conditions where oxygen is limited, such as waterlogged soils. It is part of the nitrogen cycle, where nitrogen is circulated between the atmosphere, organisms and the earth.
2 The data
The study uses data collected from a mesocosm experiment – i.e. an outdoor experiment that examines the natural environment under controlled conditions. The experiment was set up as a randomized complete block design, with 4 varieties and 3 replicates, using 12 non-weighted lysimeters. A non-weighted lysimeter is a device to measure the amount of water that drains through soil, and to determine the types and amounts of dissolved nutrients or contaminants in the water. Each lysimeter had five sampling ports with soil moisture probes and custom-built pore gas sample, at depths of 7.5, 30, 60, 90 and 120 cm below soil surface.
\[4 \times 3 \times 5 \times 161 = 9660 \tag{2}\]
Equation 2 shows how many observations we should expect to have. In reality, some observations are missing.
| Code | Name | Description |
|---|---|---|
day_column_depth |
Combination | |
date_R |
Weird date | Year + DOY |
column |
Column | |
depth |
Measurement depth | |
increment |
Height of a specific layer | |
variety |
Wheat variety | |
moisture |
Soil moisture | |
concNO3N |
x NO3-N concentration | Nitrate nitrogen concentration ([NO3] = [NO3-N] * 4.43). |
NO3N_ha |
||
corrected.N2O |
||
corrected.CO2 |
||
mgN2ONm3 |
||
gN2ONha |
Calculated from BD | |
gCO2Cha |
||
CN |
x | |
d15Nbulk |
||
d15Nalpha |
||
d15Nbeta |
||
SP |
Site preference | |
d18O |
Ratio of stable isotopes oxygen-18 (18O) and oxygen-16 (16O). |
bulk.density <- 1686 #kg/m3 #verify later
porosity <- 1- bulk.density/2650 #1 - kg minerals/m3 soil * m3 minerals/kg minerals = 1 - m3 minerals/m3 soil = m3 pore/m3 soil
VWC_gas$mgN2ONm3 <- VWC_gas$corrected.N2O * 1 /(0.082*293)*28 # 0.082 = Gas constant, 293 = Temperature, 28 = conversion coefficient for N2O-N
VWC_gas$gN2ONha <- VWC_gas$mgN2ONm3 * VWC_gas$increment/100 * (porosity - VWC_gas$moisture)*10000/10003 Formal model description
3.1 Model parameters
| Symbol | Code | Name | Value | Unit |
|---|---|---|---|---|
| \(BD\) | BD |
Bulk density (mass of the many particles of the material divided by the bulk volume) | \(1.686\) | g cm-3 |
| \(\theta_w\) | theta_w |
Soil volumetric water content | ||
| \(\theta_a\) | theta_a |
Air-filled porosity | \(1-\frac{\theta_w}{\theta_t}\) | |
| \(\theta_t\) | theta_t |
Total soil porosity | \(1-\frac{BD}{2.65}\) | |
| \(\text T\) | temperature |
Soil temperature | \(298\) | K |
| \(D_{\text{s}}\) | D_s |
Gas diffusion coefficient | Equation 4 | m2s-1 |
| \(D_{\text{fw}}\) | D_fw |
Diffusivity of N2O in water | Equation 6 | |
| \(D_{\text{fa}}\) | D_fa |
Diffusivity of N2O in air | Equation 7 | |
| \(D_{\text{fa,NTP}}\) | Free air diffusion coefficient under standard conditions | Equation 7 | ||
| \(n\) | n |
Empirical parameter (1) | 1.81 | |
| \(H\) | H |
Dimensionless Henry’s solubility constant | Equation 5 | |
| \(\rho\) | rho |
Gas density of N2O | \(1.26 \times 10^6\) | mg m-3 |
The diffusion fluxes between soil increments are described by Frick’s law (Equation 3).
\[F_{\text{calc}} = \frac{dC}{dZ} D_{\text s} \rho \tag{3}\]
Here, \(D_s\) is the gas diffusion coefficient, \(\rho\) is the gas density of N2O, and \(\frac{dC}{dZ}\) is the N2O concentration gradient from lower to upper depth. The fluxes are calculated based on N2O concentration gradients between 105-135 cm, 75-105 cm, 45-75 cm, 15-45 cm, and 0-15 cm depth layers, and ambient air above the soil surface.
\(\theta_w\) is the soil volumetric water content, \(\theta_a\) the air-filled porosity, and \(\theta_T\) is the total soil porosity.
The gas diffusion coefficient \(D_{\text s}\) was calculated according Equation 4 as established by Millington and Quirk in 1961 (2).
\[D_{\text s} = \left( \frac{\theta_w^{\frac{10}{3}} + D_{\text fw}}{H} + \theta_a^{\frac{10}{3}} \times D_{\text fa} \right) \times \theta_T^{-2} \tag{4}\]
Here, \(H\) represents a dimensionless form of Henry’s solubility constant (\(H'\)) for N2O in water at a given temperature. The constant \(H\) for N2O is calculated as follows:
\[H = \frac{8.5470 \times 10^5 \times \exp \frac{-2284}{\text T}}{\text R \times \text T} \tag{5}\]
Here, \(\text R\) is the gas constant, and \(\text T\) is the temperature (\(\text T = 298 \; \text K\)).
\(D_{\text{fw}}\) was calculated according to Equation 6 as documented by Versteeg and Van Swaaij (1988) (3).
\[D_{\text{fw}} = 5.07 \times 10^{-6} \times \exp \frac{-2371}{\text T} \tag{6}\]
\[D_{\text{fa}} = D_{\text{fa, NTP}} \times \left( \frac{\text T}{273.15} \right)^n \times \left( \frac{101'325}{\text P} \right) \tag{7}\]
3.2 Smoothing curves
The N2O concentration, site preference as well as \(\delta\)18O are estimated as a function of time for every depth and every column, separately. To achieve this function approximation, Kernel Regression as implemented in npreg is used (4). Besides choosing a Kernel, the model only requires a single hyperparameter, i.e. the bandwidth (bws), which facilitates the hyperparameter tuning.